<style scoped lang="less">
</style>
<template>
	<div class="plan-details">
		<el-form label-width="150px">
			<el-form-item label="消防人员：">
				<el-button type="green" @click="fireManModalVisible=true">点击查看</el-button>
			</el-form-item>
			<el-form-item label="消防器材：">
				<el-button type="green" @click="fireEquipmentModalVisible=true">点击查看</el-button>
			</el-form-item>
			<el-form-item label="简介描述：">
				<el-input type="textarea" rows="4" v-model.trim="detail.des" readonly></el-input>
			</el-form-item>
			<el-form-item label="相关照片：" style="min-height: 100px">
				<p v-if="!detail.img">暂无照片</p>
				<img v-else :src="detail.img" alt="">
			</el-form-item>
		</el-form>
		<!-- 消防人员 start -->
		<el-dialog title="消防人员" :visible.sync="fireManModalVisible" width="1000px" :close-on-click-modal="false" :close-on-press-escape="false" destroy-on-close append-to-body>
			<FireMan 
				ref="fireMan"
				:id="id"
	    		@cancel="fireManModalVisible=false"
	    	>
	    	</FireMan>
		</el-dialog>
		<!-- 消防人员 end -->
		<!-- 消防器材 start -->
		<el-dialog title="消防器材" :visible.sync="fireEquipmentModalVisible" width="1000px" :close-on-click-modal="false" :close-on-press-escape="false" destroy-on-close append-to-body>
			<FireEquipment 
				ref="fireEquipment"
				:id="id"
	    		@cancel="fireEquipmentModalVisible=false"
	    	>
	    	</FireEquipment>
		</el-dialog>
		<!-- 消防器材 end -->
	</div>
</template>
<script>
import FireMan from '@/components/census/record/FireMan.vue'
import FireEquipment from '@/components/census/record/FireEquipment.vue'
export default {
	name: 'PlanDetail',
	props: {
		id: {
			type: String,
			default: ''
		},
	},
	components: {
		FireMan,
		FireEquipment
	},
	watch: {},
	data () {
		return {
			planList: [],
			detail:{},
			loading: false,
			fireManModalVisible: false,
			fireEquipmentModalVisible: false,
		}
	},
	methods: {
		getData () {
			this.loading = true
			this.$get('/check/miniFirestation/miniFirestationDetail', {
				businessId: this.id
			}).then(res => {
				this.loading = false
				this.detail = res.data
            }, (err) =>{
            	this.loading = false
            	this.$message.error(err.msg)
            })
		}
	},
	created () {
		this.getData()
	},
}
</script>